local thbattle__hecheng_jiangxin = fk.CreateSkill {

  name = "thbattle__hecheng_jiangxin",

  tags = {},

}



thbattle__hecheng_jiangxin:addEffect("viewas", {
  name = "thbattle__hecheng_jiangxin",
  prompt = "#thbattle__hecheng_jiangxin",
  pattern = ".|.|.|.|.|basic",
  interaction = function(self, player)
    local all_names = Fk:getAllCardNames("b")
    local names = player:getViewAsCardNames("thbattle__hecheng_jiangxin", all_names)
    if #names == 0 then return end
    return UI.CardNameBox { choices = names, all_choices = all_names }
  end,
  view_as = function(self, player, cards)
    if player:isKongcheng() or not self.interaction.data then return end
    local card = Fk:cloneCard(self.interaction.data)
    card:addSubcards(player:getCardIds("h"))
    card.skillName = thbattle__hecheng_jiangxin.name
    return card
  end,
  enabled_at_play = function(self, player)
    if not player:isKongcheng() then
      if player.phase == Player.NotActive then
        return true
      else
        return player:usedSkillTimes(thbattle__hecheng_jiangxin.name) == 0
      end
    end
  end,
  enabled_at_response = function(self, player, response)
    return true
  end,
})

return thbattle__hecheng_jiangxin
